<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>




    <script>
        // 2. 编写parent构造函数; 并创建一个自我介绍功能; -->
        let myself = { name: "大雄", age: 33, sex: "男" };
        function Parent(people) {
            this.name = people.name
            this.age = people.age
            this.sex = people.sex
        }

        let introduce = new Parent(myself)
        console.log(introduce)

    </script>

</body>

</html>